home *** CD-ROM | disk | FTP | other *** search
/ Geek 6 / Geek-006.iso / mac / soundhandle-1.0.3.sit.hqx / SoundHandle 1.0.3 ƒ / SoundHandle 1.0.3.rsrc / TEXT_128.txt < prev    next >
Text File  |  1995-03-12  |  20KB  |  185 lines

  1. ======================
  2. About SoundHandle 1.0.3
  3. ======================
  4.  
  5. This application allows you to record, play, display, analyze, modify and save sound samples.  You can also generate waveforms, read ΓÇÿsnd ΓÇÖ resources from other applications, save sounds as System 7 sound files, convert sounds to and from ASCII text files, and read and write AIFF files.  The application operates somewhat like a text editor, allowing you to cut and paste portions of sounds at will (including between multiple windows).  Frequency spectra may be displayed, as well as gray-scale or full-color spectrograms.  Modifications such as reversing, adding echo, amplitude scaling, resampling (changing the bandwidth/sampling rate), time scaling (changing the rate of play without changing the pitch) and frequency scaling (changing the pitch without changing the rate of play) are possible.  The waveforms may be printed or copied to the clipboard as PICTΓÇÖs, there to be pasted into other applications.
  6.  
  7. SoundHandle requires System 7, was compiled only for the Motorola 68000 family and supports 8-bit, monophonic sounds.  (Someday, perhaps it will support the newer 16-bit, stereo sound format and be compiled for the PowerMac.)  Most of the applicationΓÇÖs arithmetic is integer.  Only the Spectra, Spectrogram, Resampling, Time Scale, and Generation are done in floating point, if an FPU is available.  Intensive operations (those showing the Progress Bar) may be done while the application is in the background.  
  8.  
  9. Sound samples may be as large as the applicationΓÇÖs memory allocation will allow (this is easy to figure: each sample is one byte -- at the standard Mac recording rate of 22255 samples/sec, each second of sound will require about 22 K; the sound can always be down-sampled to save memory or the application may be given more memory by selecting it in the Finder and choosing Get Info).  The four required Apple Events are supported.  This application may be used freely, however it is copyrighted and is not in the public domain.  Send bug reports to dveeneman@gte.com.
  10.  
  11. =================
  12. About the Windows
  13. =================
  14.  
  15. When first opened, each window will be near full screen size, and the ΓÇ£selection boxΓÇ¥ (a dashed line frame) will enclose the entire sample.  A new area may be selected by clicking with the mouse and dragging over a region of the window.  This new region bounded by the selection box may be expanded to the window size by double clicking (or hitting the enter key).  This expanded region may then be scrolled or expanded yet further by selecting and expanding another region.  The small doubled-headed arrows at the end of the horizontal and vertical scroll bars are used to reduce the view.  Clicking once on either arrow will reduce the respective dimension to allow the full sample to be seen, while maintaining the relative position of the selection box.  Clicking a second time will reposition the selection box to the respective edges of the window, thus enclosing the entire sample in that dimension (Select All in the Edit menu is equivalent to clicking both arrows twice).  The indices of the displayed end samples are shown in a ΓÇ£status barΓÇ¥ at the top of the window.  When the mouse is in the window, the mouse position (x = sample index, y = amplitude) is also shown.  In addition, when selecting a new region, the size of the region is also reported.  Clicking in the status bar will toggle the horizontal report from sample index to time position in seconds (taking into account the current sampling rate); clicking again will return it to sample index (when viewing spectra, the report will be in Hertz).  Holding down the option key when clicking the mouse will print the x and y values for the sample at the x position, printing at the y position (try it).
  16.  
  17. Please note that some commands operate on the entire data sample and some commands operate only on the data between the left and right sides of the selection box (for example, play).
  18.  
  19. =======================
  20. About the Menu Commands
  21. =======================
  22.  
  23. ----------
  24. Apple Menu
  25. ----------
  26.  
  27. About SoundHandle ΓÇö
  28. This will display the ΓÇ£About BoxΓÇ¥ and will also display the (approximate) remaining free memory.  If ΓÇ£HelpΓÇ¥ is selected, a help window is displayed and may be copied to the clipboard if desired (you may then paste it into a text application to print it).
  29.  
  30. --------
  31. File Menu
  32. --------
  33.  
  34. New -
  35. A new empty window will be opened.  Not much good unless used to paste in data from another window.  The default sample rate will be 22255 Hz.
  36.  
  37. Open -
  38. Used to open an existing file.  Four file types may be read.  The first, a SoundHandle file, is one that has been saved from this application.  If you choose the second, ΓÇÿsnd ΓÇÿ resource, all files that contain resources of type ΓÇÿsnd ΓÇÿ in their resource fork will be displayed.  Opening one of those files will display a list of all the ΓÇÿsnd ΓÇÿ resources in that file.  Choosing one of the resources will play it (if the check box is on); Command-period will stop the sound from playing.  Opening a resource will convert it and display it (compressed resources will be expanded and saved as such).  The third type, TEXT file, is an ASCII file of type TEXT that contains as the first line the number of samples in the file.  Each succeeding line has the value of one sample.  Remember that only 8-bit values may be used (range from -128 to 127), values greater will be ΓÇ£wrapped.ΓÇ¥  The default sample rate of a TEXT file is 22255 Hz.  If the original rate of the TEXT data was different, you may change it (under the Modify Menu).  This is a brute force method to import files from other machines.  The fourth type is an AIFF file.  Both uncompressed AIFF and compressed AIFC filetypes may be read.
  39.  
  40. Close -
  41. Closes the active window, prompting you to Save if it has been modified.
  42.  
  43. Save -
  44. Saves the active window to a file.  A window from an existing SoundHandle file is quietly saved.  Other windows prompt you for a file name and type.  SoundHandle files, TEXT files and AIFF files (uncompressed only) are saved in the form mentioned above.  A ΓÇÿsnd ΓÇÿ resource is saved only to a new System 7 sound file (the double clickable kind).  I thought it too risky to save ΓÇÿsnd ΓÇÿ resources to existing files; if you need to, use ResEdit to move them.
  45.  
  46. Save As -
  47. Allows you to save to a different file.
  48.  
  49. Revert -
  50. Reverts the data back to its last saved state.  Warning -- there is no Undo command in SoundHandle.  Save often and Revert if needed.
  51.  
  52. Page Setup -
  53. Sets up the page for printing.
  54.  
  55. Print -
  56. Prints the active window centered on the page.  The relative window size is preserved -- if the window is zoomed out to the maximum screen size, the data will be printed to fit as large as it can on the page (preserving the height-to-width ratio).  If you want to get fancy with multiple plots per page, use the Copy As PICT command to paste plots to a drawing application.
  57.  
  58. Quit-
  59. Quits after prompting you to save modified windows.
  60.  
  61. ---------
  62. Edit Menu
  63. ---------
  64.  
  65. Cut -
  66. Removes the data between the left and right sides of the selection box and stores it in SoundHandleΓÇÖs internal scrap (i.e., paste buffer).
  67.  
  68. Copy -
  69. Copies the data between the left and right sides of the selection box and stores it in SoundHandleΓÇÖs internal scrap.
  70.  
  71. Paste -
  72. Copies the data from SoundHandleΓÇÖs internal scrap and inserts it into the active window.  The default is to insert the data at the left side of the selection box.  If the shift key is held down, the data is inserted at the right side of the selection box.  Existing data to the right of the insertion point is shifted to the right.
  73. Remember that a window can have only one sampling rate.  If you paste in data with a different sampling rate, it wonΓÇÖt sound right.  Try to Resample it to the same rate first.
  74.  
  75. Add -
  76. Numerically adds the data from SoundHandleΓÇÖs internal scrap to the data in the active window.  The default is to add the data starting at the left side of the selection box.  If the shift key is held down, the data is added starting at the right side of the selection box.  If the amount of data to be added is longer than the existing data to be added to, the existing data is first padded with zeroΓÇÖs on the right side.
  77.  
  78. Subtract -
  79. Numerically subtracts the data in SoundHandleΓÇÖs internal scrap from the data in the active window.  The default is to subtract the data starting at the left side of the selection box.  If the shift key is held down, the data is subtracted starting at the right side of the selection box.  If the amount of data to be subtracted is longer than the existing data to be subtracted from, the existing data is first padded with zeroΓÇÖs on the right side.
  80.  
  81. Clear -
  82. Removes the data between the left and right sides of the selection box.  The delete key also does this.
  83.  
  84. Select All -
  85. Reduces the window so that all the data is visible and sets the selection box to enclose all the data.  This is equivalent to clicking both double-headed arrows twice.
  86.  
  87. Copy As PICT -
  88. Copies the data in the active window as a PICT and places it into the desk scrap (system clipboard).  From there the PICT may be pasted into other applications.  Line data (time and frequency waveforms) are copied as a series of line segments so that they may be subsequently modified if desired (great for fudging your data).  Spectrogram data (either gray-scale or color) is copied as a single PICT image.
  89.  
  90. Clear Scrap -
  91. Removes the data from the internal scrap (i.e., paste buffer).  This may be handy if memory is getting low.
  92.  
  93. Go To -
  94. Allows you to specify exact sample points to expand to, instead of using the selection box.  The starting point (as either a sample index or time in seconds) is specified, as well as the ending point or total length.
  95.  
  96. ----------
  97. Sound Menu
  98. ----------
  99.  
  100. Record -
  101. Records data from the microphone (if available) and places it in a newly created window.  The default sampling rate for the built-in recording system is 22255 Hz.  The remaining memory in seconds is displayed in the progress bar.
  102.  
  103. Play -
  104. Plays the data in the selection box out to the speaker.  The return key also does this.  Command-period or Escape will stop the sound.
  105.  
  106. Generate -
  107. Synthesizes the specified data sequence and places it in a newly created window.  Sine waves, square waves, sawtooth waves and random noise sequences may be synthesized.  After first setting the dataΓÇÖs sampling rate, you specify the number of samples, amplitude, frequency and DC offset.  You may specify different starting and ending values for the three parameters (for example, you can create a swept frequency or a ramped sine wave).  To create a constant value, specify a zero amplitude with a non-zero DC offset.  (This can be used to remove a DC offset from existing data.  Create a constant with the DC value in a new window, copy it and then subtract it from the data.)  A falling sawtooth may be created by reversing the default rising sawtooth.
  108. Uniform noise is scaled by specifying the amplitude, Gaussian noise by specifying the standard deviation.  A fixed seed (to get reproducible sequences) or a ΓÇ£randomΓÇ¥ seed (based on the system clock) may be used.
  109.  
  110. -----------
  111. Modify Menu
  112. -----------
  113.  
  114. Sampling Rate -
  115. Changes the sampling rate of the active window.  Either a standard rate may be chosen or a custom rate may be typed in (up to 65535 Hz).  This merely changes the rate at which the D/A plays out the data (as if you would play a 33-1/3 rpm LP at 45 rpm; remember LPΓÇÖs?)
  116.  
  117. Scale -
  118. Multiplies the data in the selection box by a value (100% = 1; use 200% to double the data, 50% to halve it, etc).  Different values may be chosen for the left and right sides of the selection box (this may be used to ramp up the start of a sequence or ramp down the end).  A negative scale will invert the data.
  119. Data sequences may be transitioned by ramping down the end of one and the beginning of the other and then adding them so that the ramped portions overlap.
  120.  
  121. Reverse -
  122. Reverses the data sequence in the selection box.  Look for secret messages in your favorite recordings!
  123.  
  124. Add Echo -
  125. If echo only, adds a delayed and scaled version of the data in the selection box to itself.  If reverb is chosen, it continues to add scaled and delayed versions of the data recursively.  Guess what happens if you make the scale greater than 100%?  You may want to add zeroΓÇÖs to the end of the data sequence before adding reverb, so the sequence decays to zero.
  126.  
  127. Add ZeroΓÇÖs -
  128. Adds a specified number of zero data points at either the left or right side of the selection box.
  129.  
  130. Down Sample -
  131. Changes the sampling rate to a fraction of the current rate by discarding higher frequencies.  If does this by first low-pass filtering the data (with a Hamming-weighted sin[x]/x filter), then decimating (discarding samples).  To see this, make a number of copies of a data sequence, down sample to different rates, then look at each of their spectra (adjusting the size of the spectra windows to maintain frequency scaling).  
  132. Note that this command discards data.  If you down sample, then up sample, the sequence will not be the same; however if you up sample, then down sample, the sequence will be unchanged (within numerical precision).  This command operates on the entire data sequence, replacing what was there.
  133.  
  134. Up Sample -
  135. Changes the sampling rate to a multiple of the current rate by adding null higher frequencies.  If does this by first zero-interpolating the data, then low-pass filtering the data (with a Hamming-weighted sin[x]/x filter) at the new Nyquist frequency.  To see this, make a number of copies of a data sequence, up sample to different rates, then look at each of their spectra (adjusting the size of the spectra windows to maintain frequency scaling).  
  136. You can combine up and down sampling to get rational-ratio rate changes (for example, 2/3 or 4/5 or 3/20, etc;  just remember to do the up sampling first -- if it wonΓÇÖt let you because the rate would go above 65535, first lower the rate arbitrarily with the Sampling Rate command, then restore it after youΓÇÖre done).  This command operates on the entire data sequence, replacing what was there.
  137.  
  138. Time Scale -
  139. This performs time scale modification of the data, either compressing or expanding the time scale of the data without changing its frequencies.  It sounds as though recorded speech is being spoken more quickly or slowly but in the same tone of voice.  Record someone, slow it down, and make them sound as though theyΓÇÖve had a bit too much to drink.  This command operates on the entire data sequence, replacing what was there.
  140.  
  141. Frequency Scale -
  142. This performs frequency scale modification of the data, either compressing or expanding the frequency scale of the data without changing its time span.  It sounds as though recorded speech is being spoken higher or lower but at the same rate.  (This command is really identical to time scaling; it just scales the sampling rate by the same amount.)  Record someone, increase the frequency scale, and make them sound like a chipmunk (remember Alvin?).  This command operates on the entire data sequence, replacing what was there.
  143.  
  144. ------------
  145. Spectra Menu
  146. ------------
  147.  
  148. Magnitude - dB -
  149. Performs an FFT on the (Hamming windowed) data in the selection box ( Γëñ 32768 samples), then displays the magnitude of the result on a log scale in a new window.  The FFT is always a power of 2, and the data in the selection box is zero-padded if necessary.  Since real data is always transformed (and the spectrum is thus symmetric), N/2+1 frequency coefficients are displayed (the positive frequencies).  Clicking in the status bar of a spectrum window will toggle the horizontal report between the frequency coefficient index and the frequency in Hz.
  150.  
  151. Magnitude - Linear -
  152. Performs an FFT on the data in the selection box ( Γëñ 32768 samples), then displays the magnitude of the result on a linear scale in a new window.  The FFT is always a power of 2; the data in the selection box is zero-padded if necessary.
  153.  
  154. Real -
  155. Performs an FFT on the data in the selection box ( Γëñ 32768 samples), then displays the real part of the result in a new window.  The FFT is always a power of 2; the data in the selection box is zero-padded if necessary.
  156.  
  157. Imaginary -
  158. Performs an FFT on the data in the selection box ( Γëñ 32768 samples), then displays the imaginary part of the result in a new window.  The FFT is always a power of 2; the data in the selection box is zero-padded if necessary.
  159.  
  160. Phase -
  161. Performs an FFT on the data in the selection box ( Γëñ 32768 samples), then displays the phase of the result (┬▒ 180 degrees) in a new window.  The FFT is always a power of 2; the data in the selection box is zero-padded if necessary.
  162.  
  163. Spectrogram (only for Color Quickdraw) -
  164. Calculates a 3-D spectrogram of the data in the selection box, and displays it in a new window.  A spectrogram is basically a series of magnitude spectra calculated over the data by a sliding window (Hamming) and displayed so that time is on the horizontal axis and frequency is on the vertical axis.  The number of pixels in the spectrogram is set by the resolution values: the number of horizontal pixels is the number of FFTΓÇÖs that are calculated and the number of vertical pixels is the size of the FFT/2+1 (obviously, the higher the resolution, the longer it will take to calculate the spectrogram).  The time window value sets the number of data samples that are used to calculate the FFT (zero-padded if necessary).  This effectively sets the bandwidth of the spectrogram: a small value gives more time resolution and less frequency resolution; a larger value gives the opposite (you canΓÇÖt set the value greater than N, where N/2+1 is the vertical resolution).  For example, you can see the pitch periods in time in the spectrogram of speech with a small time value, and you can see the pitch harmonics in frequency with a larger value.  The above values thus determine the size of the update (the amount the window is slid between FFTΓÇÖs) which is displayed.  
  165. The pre-emphasis is the value of a first-order differentiator that is applied to the data before calculating the FFTΓÇÖs (speech usually looks best with a pre-emphasis of 100%).  The clip level sets the pixel value (and below) that is cleared before displaying the spectrogram.  For speech with moderate background noise use a value between 50 and 100.  You may display the spectrogram in gray scale (higher values are darker), or in color (higher values go from violet to red).
  166. Spectrograms may be played.  The data played is actually the data from the window that generated the spectrogram (donΓÇÖt change that windowΓÇÖs data if you want to hear it while the spectrogram window is active).
  167.  
  168. -------------
  169. Windows Menu
  170. -------------
  171.  
  172. Hide / Show Position Status -
  173. This removes the position status bar from the window or replaces it.
  174.  
  175. Zoom Window -
  176. This is the same as clicking in the zoom box in the upper right corner of the window.
  177.  
  178. Show Samples -
  179. This places a small mark at each of the data samples if the number of samples visible in the window is smaller than the pixel-width of the window.
  180.  
  181. list of open windows -
  182. A list of open windows is maintained in the order in which they were opened (more than one open window of the same file is permitted).  You may select from this list to select the window.
  183.  
  184.  
  185. The name SoundHandle was inspired by the Mac memory technique of using a pointer to a pointer to data (called a handle).  SoundHandle is full of sound handles.